class BlueTooth {
  constructor() {}

  async initBlueTooth() {
    let res = await uni.openBluetoothAdapter()
    return true
  }

  async startBluetoothDevicesDiscovery() {
    await uni.startBluetoothDevicesDiscovery()
  }

  async stopBluetoothDevicesDiscovery() {
    await uni.stopBluetoothDevicesDiscovery()
  }

  async getBluetoothDevices() {
    const res = await uni.getBluetoothDevices()
    return res
  }

  async closeBluetoothAdapter() {
    await uni.closeBluetoothAdapter()
  }
}

export default BlueTooth